linear-time construction

visit shbcf.ru